package com.mpyy.service.systemSetting;

import com.mpyy.dao.everyday.SalesmanDaoInter;
import com.mpyy.dao.systemSetting.StaffDao;
import com.mpyy.pojo.EmployeeInfo;
import com.mpyy.pojo.EmployeeJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @PackageName:com.mpyy.service.systemSetting
 * @ClassName:StaffServiceImpl
 * @Date:2022-03-15:15:27
 * @Author: Tang Neng
 */
@Service("staffServiceImpl")
public class StaffServiceImpl implements StaffServiceInter {
    @Autowired
    private SalesmanDaoInter salesmanDaoInter;
    @Autowired
    @Qualifier("staffDao")
    private StaffDao staffDao;

    @Override
    public List<EmployeeInfo> searchStaffInfo() {
        return salesmanDaoInter.searchSalesmanSetInfo();
    }

    @Override
    public List<EmployeeJob> searchStaffJobInfo() {
        return staffDao.searchStaffJobInfo();
    }

    @Override
    public int updateStaffInfoAdd(EmployeeInfo employeeInfo) {
        return staffDao.updateStaffInfoAdd(employeeInfo);
    }

    @Override
    public int updateStaffInfoDelete(String empId) {
        return staffDao.updateStaffInfoDelete(empId);
    }

    @Override
    public int updateStaffInfo(EmployeeInfo employeeInfo) {
        return staffDao.updateStaffInfo(employeeInfo);
    }
}
